package src.com.doit;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

public class Poker {
    public static void main(String[] args) {
        List<String> poker = new LinkedList<>();
        String[] Color = "♥-♠-♦-♣".split("-");
        String[] Number = "A-2-3-4-5-6-7-8-9-10-J-Q-K".split("-");
        for (String color : Color){
            for (String num:Number)
            {
                poker.add(color+num);
            }
        }
        poker.add("大😊");
        poker.add("小😀");
        //洗牌
        Collections.shuffle(poker);

        List<String>player1=new LinkedList<>();
        List<String>player2=new LinkedList<>();
        List<String>player3=new LinkedList<>();
        List<String>diPai=new LinkedList<>();
        //发牌
        for (int i = 0; i < poker.size(); i++) {
            if(i>=51)
                diPai.add(poker.get(i));
            else{
                if(i%3==0)
                    player1.add(poker.get(i));
                else if(i%3==1)
                    player2.add(poker.get(i));
                else
                    player3.add(poker.get(i));
            }
        }
        //看牌
        System.out.println("周某人的牌:"+player1);
        System.out.println("面筋哥的牌:"+player2);
        System.out.println("刘海柱的牌:"+player3);
        System.out.println("底牌:"+diPai);
    }
}
